package com.alibaba.citrus.cr.sales.plan.dto.api.request;

import com.alibaba.citrus.cr.sales.plan.CustomLockKey;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author yuhailin
 * @description:
 * @date 2021-11-09 17:35
 */
@Data
public class BatchEditCostInsuranceFreightRequest implements CustomLockKey {

    /**
     * 业务单元code
     */
    private String orgBusinessUnitCode;

    /**
     * 关联的组织id
     */
    private String relatedOrganizationId;

    /**
     * 关联的组织类型
     */
    private String relatedOrganizationType;

    @Override
    public String getCustomLockCondition() {
        if (StringUtils.isBlank(relatedOrganizationId) || StringUtils.isBlank(relatedOrganizationType)) {
            return null;
        }
        return relatedOrganizationId + relatedOrganizationType;
    }
}
